<template>
  <div>
    <el-row>
      <el-form-item :label="label">
        <el-input
            clearable
        />
      </el-form-item>

      <el-form-item>
        <el-button type="primary" v-model="data"  @click="publish(topic,JSON.stringify({key:data}))">下发指令</el-button>
      </el-form-item>
    </el-row>
  </div>
</template>

<script setup>
const data = ref('');
const props = defineProps({
  /* 配置项 */
  label: {
    type: String,
    default: ''
  },
  topic: {
    type: String,
    default: ''
  },
  key:{
    type: String,
    default: ''
  }
})

</script>